/* 现代化主题样式 */

// 卡片样式优化
.el-card {
  border: none !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.05) !important;
  transition: all 0.3s ease;
  background: #ffffff;
  
  &:hover {
    box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.08) !important;
  }

  .el-card__header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-weight: 600;
    color: #1a2644;
  }

  .el-card__body {
    padding: 20px;
  }
}

// 表格样式优化
.el-table {
  border-radius: 8px;
  overflow: hidden;
  width: 100% !important;
  
  th {
    background-color: #f5f7fa !important;
    font-weight: 600;
    color: #1a2644;
    height: 48px;
    padding: 8px 16px;
    border-bottom: 1px solid #ebeef5;
  }
  
  td {
    padding: 12px 16px;
    color: #2c3e50;
  }

  .el-table__row {
    transition: all 0.3s ease;
    
    &:hover > td {
      background-color: #f8fafd !important;
    }
  }

  // 确保表格内容不会被截断
  .cell {
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

// 按钮样式优化
.el-button {
  border-radius: 4px;
  padding: 8px 16px;
  font-weight: 500;
  transition: all 0.3s ease;
  height: 36px;
  line-height: 1;
  
  &--primary {
    background-color: #3A7BFF !important;
    border-color: #3A7BFF !important;
    color: #fff !important;
    
    &:hover, &:focus {
      background-color: #5B91FF !important;
      border-color: #5B91FF !important;
      color: #fff !important;
    }

    &:active {
      background-color: #2D62CC !important;
      border-color: #2D62CC !important;
    }
  }
  
  &--default {
    border: 1px solid #dcdfe6;
    color: #606266;
    
    &:hover {
      border-color: #3A7BFF;
      color: #3A7BFF;
    }
  }

  // 新增按钮特殊样式
  &.add-button {
    background-color: #3A7BFF !important;
    border-color: #3A7BFF !important;
    color: #fff !important;
    
    &:hover {
      background-color: #5B91FF !important;
      border-color: #5B91FF !important;
    }
  }
}

// 输入框样式优化
.el-input {
  .el-input__inner {
    border-radius: 6px;
    padding: 0 15px;
    height: 40px;
    transition: all 0.3s ease;
    border: 1px solid #dcdfe6;
    
    &:hover {
      border-color: #3A7BFF;
    }
    
    &:focus {
      border-color: #3A7BFF;
      box-shadow: 0 0 0 2px rgba(58, 123, 255, 0.1);
    }
  }
}

// 标签页样式优化
.el-tabs {
  .el-tabs__header {
    margin-bottom: 20px;
  }
  
  .el-tabs__item {
    padding: 0 20px;
    height: 40px;
    line-height: 40px;
    transition: all 0.3s ease;
    color: #606266;
    
    &.is-active {
      color: #3A7BFF;
      font-weight: 600;
    }
    
    &:hover {
      color: #3A7BFF;
    }
  }
  
  .el-tabs__active-bar {
    background-color: #3A7BFF;
    height: 3px;
    border-radius: 3px;
  }
}

// 表格容器样式优化
.app-container {
  padding: 20px;
  min-height: calc(100vh - 84px);
  background-color: #f5f7fa;
  
  .table-container {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 180px);

    // 确保表格占据剩余空间
    .el-table {
      flex: 1;
      margin-bottom: 16px;
    }

    // 分页容器样式
    .el-pagination {
      padding: 16px 0 0;
      margin: 0;
      border-top: 1px solid #f0f2f5;
      position: relative;
      width: 100%;
      min-height: 32px;
      display: flex;
      justify-content: flex-end;
      align-items: center;
      
      // 修复分页组件的对齐和间距
      .el-pagination__total,
      .el-pagination__sizes,
      .el-pagination__jump {
        margin-bottom: 0;
      }

      .el-pagination__sizes {
        margin-right: 16px;
      }

      .el-pagination__jump {
        margin-left: 16px;
      }

      .el-pager {
        margin: 0 8px;
      }
    }
  }

  // 搜索区域样式
  .search-box {
    margin-bottom: 16px;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
  }
}

// 主容器样式
.main-container {
  min-height: 100vh;
  padding-bottom: 20px;
  position: relative;
  background-color: #f5f7fa;
}

// 状态标签样式
.el-tag {
  border-radius: 4px;
  padding: 0 12px;
  height: 28px;
  line-height: 26px;
  
  &--success {
    background-color: rgba(82, 196, 26, 0.1);
    border-color: rgba(82, 196, 26, 0.2);
    color: #52c41a;
  }
  
  &--warning {
    background-color: rgba(250, 173, 20, 0.1);
    border-color: rgba(250, 173, 20, 0.2);
    color: #faad14;
  }
  
  &--danger {
    background-color: rgba(245, 34, 45, 0.1);
    border-color: rgba(245, 34, 45, 0.2);
    color: #f5222d;
  }
}

// 弹窗样式优化
.el-dialog {
  border-radius: 8px;
  overflow: hidden;
  
  .el-dialog__header {
    padding: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    margin: 0;
    
    .el-dialog__title {
      font-weight: 600;
      font-size: 18px;
      color: #1a2644;
    }
  }
  
  .el-dialog__body {
    padding: 24px;
  }
  
  .el-dialog__footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
  }
} 